If successful, each function returns an AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure for the
named file. A null (AAAAFFFF____NNNNUUUULLLLLLLL____FFFFIIIILLLLEEEEHHHHAAAANNNNDDDDLLLLEEEE) return value indicates an error.
aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(((()))), aaaaffffOOOOppppeeeennnnFFFFDDDD(((()))), and aaaaffffOOOOppppeeeennnnNNNNaaaammmmeeeeddddFFFFDDDD(((()))) return null AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee
structures when a file opened with mode """"rrrr"""" does not parse according to
any of the implemented file format specifications.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(((()))) allocates and initializes an AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure for an
audio file. This structure is then used as the basic argument for all
Audio File Library routines which access data in the audio file.
The audio track logical read/write pointer used by aaaaffffRRRReeeeaaaaddddFFFFrrrraaaammmmeeeessss(3dm) and
aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss(3dm) is initialized to point to the location of the first
sample in the audio file.
aaaaffffOOOOppppeeeennnnFFFFDDDD(((()))) allows you to test whether a file can be opened for reading or
writing using regular Unix system calls before attempting to attach an
AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure to the file. This can help you eliminate error
messages from the Audio File Library in some cases. aaaaffffOOOOppppeeeennnnNNNNaaaammmmeeeeddddFFFFDDDD(((()))) must
be used in place of aaaaffffOOOOppppeeeennnnFFFFDDDD(3dm) if any of the files to be identified
are Sound Designer II files. This is due to the multi-file nature of the
format (resource and data fork files at a minimum), and so the full path
to the file must be known to properly identify its format. See ssssdddd2222(4)
for more information.
NNNNOOOOTTTTEEEE
The current Audio File Library does not support read-write (or "edit")
access for existing files. In order to edit an existing file through the
library, it is necessary to create a second version of the file.
Sample source code in /_u_s_r/_s_h_a_r_e/_s_r_c/_d_m_e_d_i_a/_s_o_u_n_d_f_i_l_e shows how to make a
copy of an audio file which contains all the logical components of the
original file.
CCCCAAAAVVVVEEEEAAAATTTTSSSS
Many of the routines in the Audio File Library will not function
correctly if the user changes the file position on the file descriptor
for the AFfilehandle being manipulated. See the section _C_A_V_E_A_T_S _F_O_R
_U_S_I_N_G _T_H_E _H_A_N_D_L_E'_S _F_I_L_E _D_E_S_C_R_I_P_T_O_R in aaaaffffIIIInnnnttttrrrroooo(3dm) for some important
information about how to deal with this situation Be careful when using
aaaaffffOOOOppppeeeennnnFFFFDDDD(((()))): Regardless of whether a file is opened with aaaaffffOOOOppppeeeennnnFFFFDDDD(((()))),
aaaaffffOOOOppppeeeennnnNNNNaaaammmmeeeeddddFFFFDDDD(((()))), or aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(((()))), its file descriptor will be closed when
the user issues aaaaffffCCCClllloooosssseeeeFFFFiiiilllleeee(3dm). Do not expect the file descriptor to
remain open just because it was opened by an external function call.
This is unfortunately not consistent with the SGI Movie Library, but must